package gui;

import javax.swing.JFrame;

import fiziksobject.FiziksBall;
import physics.Location;
import physics.PhysicsEngine;
import physics.Vector;
import physics.physicsobject;

public class FiziksObjectMenu extends Menu<physicsobject> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected void add() {
		PhysicsEngine.getPhysicsEngine().addPhysicsObject(new FiziksBall(1,0,new Vector(),new Location(0,0),1));
	}

	@Override
	protected void edit(physicsobject e) {
		FiziksBallProperties fom = new FiziksBallProperties((FiziksBall)e);
		fom.setVisible(true);
		fom.setSize(233,377);
	}

	@Override
	protected physicsobject[] getThings() {
		return PhysicsEngine.getPhysicsEngine().getPhysicsObjects().toArray(new physicsobject[0]);
	}

	@Override
	protected void remove(physicsobject e) {
		PhysicsEngine.getPhysicsEngine().removePhysicsObject(e);
		refresh();
	}

}
